<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html lang="en">
<head>
	<%@include file="/WEB-INF/jsp/qsws/commons/head.jsp" %>
    <link rel="stylesheet" type="text/css" href="resources/qsws/css/zixun.css">
</head>
<body>
	<!-- 头部 -->
	<header>
		<a href="javascript:history.back();" class="back"></a>
		<h1>资讯详情</h1>
	</header>
	<section>
		<div class="top">
			<h3>${article.title }</h3>
			<p><span><fmt:formatDate value="${article.create_time }" pattern="yyyy-MM-dd"/></span><span>${article.creater }</span></p>	
		</div>
		<div class="content">
			${article.content }
		</div>	
	</section>
	<footer class="clearfix">
		<a href="javascript:;" class="shouc"><img src="resources/qsws/img/star1.png" alt=""><span>232</span></a>
		<a href="javascript:;" class="zan"><img src="resources/qsws/img/shou1.png" alt=""><span>4343</span></a>
		<a href="javascript:;" class="share"><img src="resources/qsws/img/share.png" alt=""></a>
	</footer>
</body>
<script>
	 $(document).ready(function(){
        $(".shouc").one('click',function(){
        	$(this).find('img').attr('src', 'resources/qsws/img/star2.png').css({'border':'1px solid #cf2106'});
            var oldValue=parseInt($(this).find('span').html());//取出现在的值，并使用parseInt转为int类型数据
            oldValue++;//自加1
            $(this).find('span').html(oldValue);//将增加后的值付给原控件
        });
         $(".zan").one('click',function(){
        	$(this).find('img').attr('src', 'resources/qsws/img/shou2.png').css({'border':'1px solid #cf2106'});
            var oldValue=parseInt($(this).find('span').html());//取出现在的值，并使用parseInt转为int类型数据
            oldValue++;//自加1
            $(this).find('span').html(oldValue);//将增加后的值付给原控件
        });
    });
</script>
</html>